		TITLE	NAME_INSTALL - Copyright (C) 1994 SLR Systems

		INCLUDE	MACROS
;		INCLUDE	CDDATA

		PUBLIC	LNAME_INSTALL


		.DATA

		EXTERNDEF	SYMBOL_TEXT:BYTE

		EXTERNDEF	SYMBOL_LENGTH:DWORD,SYM_HASH_MOD:DWORD

		EXTERNDEF	LNAME_STUFF:ALLOCS_STRUCT


		.CODE	PASS1_TEXT

		EXTERNDEF	ALLOC_LOCAL:PROC


LNAME_INSTALL	PROC
		;
		;EAX IS TPTR_STRUCT, ECX IS HASH_MOD, EDX IS HASH
		;
		;RETURN EAX IS LOGICAL ADDRESS
		;
		PUSH	ESI
		LEA	ESI,[EAX]._TP_TEXT

		MOV	EAX,[EAX]._TP_LENGTH
		PUSH	EDI

		ADD	EAX,SIZE TPTR_STRUCT+SIZE PRETEXT_PTR_STRUCT-3	;
		CALL	ALLOC_LOCAL		;EAX LOG
		ASSUME	EAX:PTR TPTR_STRUCT

		XOR	EDI,EDI
		MOV	[EAX+4]._TP_FLAGS,ECX

		MOV	DPTR [EAX],EDI		;PTR TO MYCOMDAT STRUCTURE
		MOV	ECX,[ESI+(TPTR_STRUCT._TP_LENGTH - TPTR_STRUCT._TP_TEXT)]

		MOV	[EAX+4]._TP_HASH,EDX
		MOV	[EAX+4]._TP_LENGTH,ECX

		SHR	ECX,2
		LEA	EDI,[EAX+4]._TP_TEXT

		INC	ECX
		LEA	EAX,[EAX+4]

		OPTI_MOVSD

		POPM	EDI,ESI

		RET

LNAME_INSTALL	ENDP


		END

